#!/usr/bin/perl -w # for syntax highlighting
# CSS-V1

use gri_secmgr qw(get_user_name);

sub mm_admin_user_options {
my ($portal,$repname,$repnum)=@_;

	my $user_name=get_user_name();
	my ($user_admin,$err)=$::GRI_FRONTEND->does_user_have_role($user_name,"user_admin");

	#################################################################
	# If the user is not in the "user_admin" then we don't create	#
	# any links...													#
	#################################################################
	if($user_admin==0) {
		return "
    <tr class=gri_row>
      <td colspan=2 class=gri_cell-disabled>&nbsp; &nbsp; Modify Existing User Capabilities</td>
    </tr>
    <tr class=gri_row>
      <td colspan=2 class=gri_cell-disabled>&nbsp; &nbsp; Modify Alerts for User</td>
    </tr>";
	}

	#################################################################
	# We now need to generate links to the admin pages ...			#
	#################################################################
	my $s="
    <tr class=gri_row>
      <td colspan=2 class=gri_cell>&nbsp;&nbsp;";
	$s.=link_to_str("stdlink","Modify Existing User Capabilities","form_modify_user_chooser","");
	$s.="
      </td>
    </tr>";
	$s.="
    <tr class=gri_row>
      <td colspan=2 class=gri_cell>&nbsp;&nbsp;";
	$s.=link_to_str("stdlink","Modify Alerts for User","form_modify_user_alerting_chooser","");
	$s.="
      </td>
    </tr>";
	return $s;
}

1;

# vim: ts=4:sw=4
